﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="New.aspx.cs" Inherits="MVCClubSite.Web.Views.Events.New" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<div class="contentblock">
        <h2>
            New Event</h2>
        <% using (Html.BeginForm("Create", "Events", FormMethod.Post))
           { %>
        <table>
            <tr>
                <td>
                    <%= Html.Label("title", "Event Title:")%>
                </td>
                <td>
                    <%= Html.TextBox("title", "", new { size = "80" })%>
                </td>
            </tr>
            <tr>
                <td>
                    <%= Html.Label("description", "Description:")%>
                </td>
                <td>
                    <%=Html.TextArea("description", "", 6, 80, null)%>
                </td>
            </tr>
            <tr>
                <td>
                    <%= Html.Label("startdatetime", "Start Date:")%>
                </td>
                <td>
                    <%= Html.TextBox("startdatetime", DateTime.Now.ToShortDateString(), (object)new { @size = "10" })%>
                    <%= Ajax.Calendar("startdatetime")%>
                </td>
            </tr>
            <tr>
                <td>
                    <%= Html.Label("enddatetime", "End Date:")%>
                </td>
                <td>
                    <%= Html.TextBox("enddatetime", DateTime.Now.ToShortDateString(), (object)new { @size = "10" })%>
                    <%= Ajax.Calendar("enddatetime")%>
                </td>
            </tr>
            <tr>
                <td>
                    <%= Html.Label("locationID", "Location:")%>
                </td>
                <td>
                    <select size="5" name="locationID" id="locationID">
                        <option value="0" selected="selected">No Location Selected</option>
                        <% foreach (Location l in ViewData.Model.Locations)
                           { %>
                        <%= "<option value='" + l.ID + "'>" + l.Title + "</option>" %>
                        <%} %>
                    </select>
                    <br />
                    <%= Html.ActionLink("Create New Location", "Create", "Locations") %>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <br />
                    <input type="submit" value="Save" id="saveButton" />
                </td>
            </tr>
        </table>
        <%} %>
    </div>

    <script type="text/javascript" src="<%=AppHelper.JavascriptUrl("tinymce/tiny_mce.js") %>"></script>

    <script type="text/javascript" src="<%=AppHelper.JavascriptUrl("tinymce/advanced_config.js") %>"></script>

</asp:Content>
